import {httpGet, httpPost, httpPut} from '@frontend/vue-common'
import {getCurrentGlobalProperties} from "@frontend/vue-common/src/app";

export const listProductCustomValueAPI = (pageNum, pageSize, sortField, sortOrder, filter) => {
    return httpGet("/v1/soms/productCustomValue", {
        pageNum: pageNum,
        pageSize: pageSize,
        sortField: sortField,
        sortOrder: sortOrder,
        somsProductId: filter.somsProductId,
		fieldId: filter.fieldId,
		fieldName: filter.fieldName,
		fieldType: filter.fieldType,
		printFlag: filter.printFlag,
		sort: filter.sort,
		value: filter.value,
		
    })
}

export const addProductCustomValueAPI = (data) => {
    return httpPut("/v1/soms/productCustomValue", data)
}

export const getProductCustomValueAPI = (data) => {
    return httpGet(`/v1/soms/productCustomValue/${data.id}`, {})
}

export const editProductCustomValueAPI = (data) => {
    return httpPost(`/v1/soms/productCustomValue/${data.id}`, data)
}

export const deleteProductCustomValueAPI = (ids) => {
    return httpPost(`/v1/soms/batchDeleteProductCustomValue`, {
        ids: ids,
    })
}

